package com.cch.datageniebackendmaster.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.time.LocalDateTime;

/**
 * <p>
 * 图表
 * </p>
 *
 * @author cch
 */
@TableName("chart")
@ApiModel(value = "ChartEntity对象", description = "图表")
public class ChartEntity extends Model<ChartEntity> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty(value = "名称")
    @TableField("chart_name")
    private String chartName;

    @ApiModelProperty(value = "类型")
    @TableField("type")
    private String type;

    @ApiModelProperty(value = "原始数据")
    @TableField("raw_data")
    private String rawData;

    @ApiModelProperty(value = "分析诉求")
    @TableField("goal")
    private String goal;

    @ApiModelProperty(value = "分析结论")
    @TableField("result_text")
    private String resultText;

    @ApiModelProperty(value = "分析图表")
    @TableField("result_chart")
    private String resultChart;

    @ApiModelProperty(value = "用户id")
    @TableField("user_id")
    private Long userId;

    @ApiModelProperty(value = "状态（0等待中 1执行中 2已完成 3失败）")
    @TableField("status")
    private Integer status;

    @ApiModelProperty(value = "执行信息")
    @TableField("gen_log")
    private String genLog;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新时间")
    @TableField("update_time")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "是否删除（0否 1是）")
    @TableField("if_delete")
    @TableLogic
    private Integer ifDelete;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getChartName() {
        return chartName;
    }

    public void setChartName(String chartName) {
        this.chartName = chartName;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getRawData() {
        return rawData;
    }

    public void setRawData(String rawData) {
        this.rawData = rawData;
    }

    public String getGoal() {
        return goal;
    }

    public void setGoal(String goal) {
        this.goal = goal;
    }

    public String getResultText() {
        return resultText;
    }

    public void setResultText(String resultText) {
        this.resultText = resultText;
    }

    public String getResultChart() {
        return resultChart;
    }

    public void setResultChart(String resultChart) {
        this.resultChart = resultChart;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getGenLog() {
        return genLog;
    }

    public void setGenLog(String genLog) {
        this.genLog = genLog;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getIfDelete() {
        return ifDelete;
    }

    public void setIfDelete(Integer ifDelete) {
        this.ifDelete = ifDelete;
    }

    @Override
    public String toString() {
        return "ChartEntity{" +
                "id=" + id +
                ", chartName='" + chartName + '\'' +
                ", type='" + type + '\'' +
                ", rawData='" + rawData + '\'' +
                ", goal='" + goal + '\'' +
                ", resultText='" + resultText + '\'' +
                ", resultChart='" + resultChart + '\'' +
                ", userId=" + userId +
                ", status=" + status +
                ", genLog='" + genLog + '\'' +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", ifDelete=" + ifDelete +
                '}';
    }
}
